package org.shop.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.shop.dao.ShufflingInstallMapper;
import org.shop.entity.ShufflingInstall;
import org.shop.service.ShufflingInstallService;
import org.shop.service.base.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class ShufflingInstallServiceImpl extends BaseServiceImpl<ShufflingInstall, Long> implements ShufflingInstallService {

	@Autowired
	private ShufflingInstallMapper shufflingInstallMapper;
	
	@Override
	public Map<String, Object> getAllShufflingInfo(Map<String, Object> pramMap) {
		List<Map<String, Object>> allUsersInfoList = shufflingInstallMapper.getAllShufflingInfo(pramMap);
        Integer count = shufflingInstallMapper.getAllShufflingInfoCount(pramMap);
        //分页数据
        Map<String, Object> dataMap = new HashMap<String, Object>();
        dataMap.put("total", count);
        dataMap.put("rows", allUsersInfoList);
        return dataMap;
	}

	@Override
	public int updateAllShufflingOfDefaultState(Long shufflingId) {
		return shufflingInstallMapper.updateAllShufflingOfDefaultState(shufflingId);
	}

	@Override
	public ShufflingInstall getShufflingInstallInfo(Map<String, Object> paramMap) {
		return shufflingInstallMapper.getShufflingInstallInfo(paramMap);
	}
	
	
}